<%--
  Created by IntelliJ IDEA.
  User: nico
  Date: 01/10/12
  Time: 16:30
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<s:textfield label="Report" name="secdiscrepancyreport.report" id="report" value="%{secdiscrepancyreport.report}"  />

<s:hidden  name="secdiscrepancyreport.receivedBms" id="altreceivedBms" value="%{secdiscrepancyreport.receivedBms}"/>
<s:textfield label="Received at BMS" id="receivedBms" cssClass="datepicker"/>

<s:hidden  name="secdiscrepancyreport.sentToSite" id="altsentToSite" value="%{secdiscrepancyreport.sentToSite}"/>
<s:textfield label="Sent to Site" id="sentToSite" cssClass="datepicker"/>

<s:hidden  name="secdiscrepancyreport.receivedFromSite" id="altreceivedFromSite" value="%{secdiscrepancyreport.receivedFromSite}"/>
<s:textfield label="Received From Site" id="receivedFromSite" cssClass="datepicker"/>

<s:select label="Scope" name="secdiscrepancyreport.scope" id="scope"  value="%{secdiscrepancyreport.scope}"
          list="#{'1':'Site', '2':'Multi-site'}"/>

<tr>
    <td colspan="2" style="text-align: center">
        <s:submit value="Save" id="secdiscrepancyreportSave" action="secdiscrepancyreportSave" onclick="setEmptyDates();validate();beforeSave();" theme="simple" />
    </td>
</tr>
<s:if test="secdiscrepancyreport.id != null">
    <tr>
        <td colspan="2" style="text-align: center">
            <button id="secdiscrepancyreportClear" onclick="$('#category').change(); $('html, body').animate({ scrollTop:  $('#category').offset().top - 15 }); return false;">Clear</button>
        </td>
    </tr>
</s:if>
<s:hidden name="secdiscrepancyreport.id" value="%{secdiscrepancyreport.id}"/>

<script>
    inicializarTodaFecha();
</script>
<s:if test="secdiscrepancyreport.id != null">
    <script type="text/javascript">
        $('#scope').parent().parent().remove();
    </script>
</s:if>